import axios from 'axios';

let baseUrl = 'http://106.54.17.183:3000';
// let baseUrl = 'http://192.168.19.22:3500';


let getAPI = '';
let postAPI = '';

export const GET = (url,params)=>{
	getAPI = baseUrl+url; 
	return axios.get(getAPI,{
		params:params
	}).then(res=>{
		return res;
	})
}

export const DELETE = (url,params)=>{
	getAPI = baseUrl+url;
	return axios.delete(getAPI,{
		params:params
	}).then(res=>{
		return res;
	})
}

export const POST = (url,params)=>{
	postAPI = baseUrl+url;
	return axios.post(postAPI,params).then(res=>{
		return res;
	})
}

export const PUT = (url,params)=>{
	postAPI = baseUrl+url;
	return axios.put(postAPI,params).then(res=>{
		return res;
	})
}
